package service

import (
	"go-shop-api/pkg/go_captcha"
	"go-shop-api/pkg/serializer"
)

//验证码

// CaptchaService 验证验证码
type CaptchaService struct {
	Key  string `form:"key" binding:"required" `
	Dots string `form:"dots" binding:"required" `
}

// GetVerifyCode 发送验证码
func (cs *CaptchaService) GetVerifyCode() *serializer.Response {
	return go_captcha.GetVerifyCode()
}

// CheckVerifyCode 验证验证码
func (cs *CaptchaService) CheckVerifyCode() *serializer.Response {
	return go_captcha.CheckVerifyCode(cs.Key, cs.Dots)
}
